{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T00:57:44.626073Z",
     "start_time": "2020-10-23T00:57:44.332569Z"
    }
   },
   "outputs": [],
   "source": [
    "import sklearn\n",
    "import numpy as np\n",
    "import scipy\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T00:59:39.840604Z",
     "start_time": "2020-10-23T00:59:39.509857Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAECCAYAAADXWsr9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAMLElEQVR4nO3dW4xV9RXH8d+vI4hcDFWstaKiqSFRkwohqCWxFcTgJbQPTYREk5pamqa10jY16ov1pY9GH1oTg1pTb1WUtjGWSrzWtGK5VhAwSjCOiKjUANMWFFcfzsZQmHb24P7vOcz6fpITzpw57LWG4Tf/fc7svZcjQgCGt88NdQMAyiPoQAIEHUiAoAMJEHQgAYIOJNAVQbc9x/Ym26/bvrFwrXtsb7e9rmSdA+qdYvtZ2xtsr7d9feF6o2y/bHttVe/WkvWqmj22V9t+onStqt4W26/YXmN7ReFa420vtr2x+h5eULDW5Opr2n/baXthIxuPiCG9SeqR9IakMySNlLRW0lkF610oaaqkdS19fSdJmlrdHyfptcJfnyWNre6PkLRc0vmFv8afSHpQ0hMt/ZtukTShpVr3Sbq2uj9S0viW6vZI2ibptCa21w0r+nRJr0fE5ojYK+lhSd8oVSwiXpC0o9T2+6n3TkSsqu7vkrRB0skF60VE7K4+HFHdih0VZXuipMslLSpVY6jYPladheFuSYqIvRHxYUvlZ0l6IyLebGJj3RD0kyW9dcDHvSo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hNks6VJNs9kt6WtKRsWwCaNNhd91mS3oiIN0s0A6CMwQZ9nqSHSjQCoJzaQa+u6T5X0qP/4/PMXgO61GBW9EslrYqId/v7JLPXgO41mKDPF7vtwBGpVtBtj5Y0W9LjZdsBUELdkUz/lHR84V4AFMKRcUACBB1IgKADCRB0IAGCDiRA0IEECDqQAEEHEiDoQAKOiOY3ar8n6XDOWZ8g6f2G2+mGWtSjXlv1TouIEw5+sEjQD5ftFRExbbjVoh71hroeu+5AAgQdSKDbgn7XMK1FPeoNab2ueo0OoIxuW9EBFEDQgQQIOpAAQQcSIOhAAv8BvX3ARBVCBhsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 288x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.datasets import load_digits\n",
    "digits=load_digits()\n",
    "plt.matshow(digits.images[29])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T01:08:50.251521Z",
     "start_time": "2020-10-23T01:08:50.051292Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAoBklEQVR4nO3dbYxc5ZUn8P/p8jVUkx2qnTQICow9s5G9w3jcPfQmlrxaxc4EkxCghzdPNqxYaSS+zIdgsT3pzKIYWEb0bisxX/YLmonGEkzG5mUas/5gEGaUWWvNTjttx+MFi9kATgoLO4ObBNxAufvsh6rbfevWfe5b3Vt1763/T0Ltrq6X5zb2qafOc57ziKqCiIjyZ6DXAyAiongYwImIcooBnIgopxjAiYhyigGciCinVnXzxb7whS/ounXruvmSRES5d+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Ox9Mr7InINADS/nuvxeFIhIhYawfsZVX2heXNfXDsAqOo8gL9HYw2k6Ne9FcDtIvIOGmnR7SLyNApy3QzgK/4RwBdFZL2IrAbwxwAO9HhM3XYAwP3NP98P4MUejiUVIiIA/grAG6r6Q8ePCn3tIjIsIpXmn8sA/hDAmyj4davq91T1OlVdh8a/6cOqeh8Kct3ciekgIt9AI19WAvAjVf2L3o4oPSLyYwBfQaO15vsAdgOYAbAfwFoAZwDco6ruhc5cE5F/B+AfAJzESk70z9HIgxf22kXk99FYrCuhMXHbr6qPicjnUeDrdhKRrwD4z6r6zaJcNwM4EVFOMYVCRJRTDOBERDnFAE5ElFMM4EREOcUATkSUUwzgREQ5xQBORJRT/x/gE6YwCa++PQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.datasets import load_boston\n",
    "from sklearn.linear_model import LinearRegression\n",
    "load_data=load_boston()\n",
    "data_x=load_data.data\n",
    "data_y=load_data.target \n",
    "model=LinearRegression()\n",
    "model.fit(data_x,data_y)\n",
    "result=model.predict(data_x)\n",
    "plt.scatter(result,data_y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T01:31:03.223140Z",
     "start_time": "2020-10-23T01:31:03.218667Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[6.3200e-03 1.8000e+01 2.3100e+00 ... 1.5300e+01 3.9690e+02 4.9800e+00]\n",
      " [2.7310e-02 0.0000e+00 7.0700e+00 ... 1.7800e+01 3.9690e+02 9.1400e+00]\n",
      " [2.7290e-02 0.0000e+00 7.0700e+00 ... 1.7800e+01 3.9283e+02 4.0300e+00]\n",
      " ...\n",
      " [6.0760e-02 0.0000e+00 1.1930e+01 ... 2.1000e+01 3.9690e+02 5.6400e+00]\n",
      " [1.0959e-01 0.0000e+00 1.1930e+01 ... 2.1000e+01 3.9345e+02 6.4800e+00]\n",
      " [4.7410e-02 0.0000e+00 1.1930e+01 ... 2.1000e+01 3.9690e+02 7.8800e+00]]\n"
     ]
    }
   ],
   "source": [
    "print(data_x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-10-23T01:30:56.403891Z",
     "start_time": "2020-10-23T01:30:56.395551Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[-0.41978194  0.28482986 -1.2879095  ... -1.45900038  0.44105193\n",
      "  -1.0755623 ]\n",
      " [-0.41733926 -0.48772236 -0.59338101 ... -0.30309415  0.44105193\n",
      "  -0.49243937]\n",
      " [-0.41734159 -0.48772236 -0.59338101 ... -0.30309415  0.39642699\n",
      "  -1.2087274 ]\n",
      " ...\n",
      " [-0.41344658 -0.48772236  0.11573841 ...  1.17646583  0.44105193\n",
      "  -0.98304761]\n",
      " [-0.40776407 -0.48772236  0.11573841 ...  1.17646583  0.4032249\n",
      "  -0.86530163]\n",
      " [-0.41500016 -0.48772236  0.11573841 ...  1.17646583  0.44105193\n",
      "  -0.66905833]]\n"
     ]
    }
   ],
   "source": [
    "ss=sklearn.preprocessing.StandardScaler()\n",
    "print(ss.fit_transform(data_x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
